﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Service.ZSJL.Com.Security
{
    public interface IEncrypt
    {
        /// <summary>
        /// 加密方法
        /// </summary>
        /// <param name="source">原字符串</param>
        /// <returns></returns>
        string EnCode(string source);

        /// <summary>
        /// 加密方法
        /// </summary>
        /// <param name="pToEncrypt">需要加密字符串</param>
        /// <param name="sKey">密钥</param>
        /// <returns>加密后的字符串</returns>
        string EnCode(string pToEncrypt, string sKey);

        /// <summary>
        /// 解密方法
        /// </summary>
        /// <param name="source">原字符串</param>
        /// <returns></returns>
        string DeCode(string source);

        /// <summary>
        /// 解密方法
        /// </summary>
        /// <param name="pToDecrypt">需要解密的字符串</param>
        /// <param name="sKey">密匙</param>
        /// <returns>解密后的字符串</returns>
        string DeCode(string pToEncrypt, string sKey);
    }
}
